# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=samesame
pkgver=68.a9bcd7b
pkgrel=1
pkgdesc='Command line tool to generate crafty homograph strings.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-fuzzer')
url='https://github.com/TheTarquin/samesame'
license=('custom:IDGAD')
makedepends=('cargo' 'git')
source=("git+https://github.com/TheTarquin/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  cargo build
}

package() {
  cd $pkgname

  install -Dm 755 "target/debug/$pkgname" "$pkgdir/usr/bin/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

